<!DOCTYPE html>
<html>
<body>
  <input type="text" id="inputText" placeholder="输入字符串">
  <button onclick="reverseText()">反向输出</button>
  <p id="output"></p>

  <script>
    function reverseText() {
      const input = document.getElementById("inputText").value;
      document.getElementById("output").textContent = input.split('').reverse().join('');
    }
  </script>
</body>
</html>